<template>
  <div class="card">
    <search></search>
    <weather></weather>
  </div>
</template>

<script>
import weather from './Weather.vue'
import search from './Search.vue'
export default {
  mounted(){
    // 每个路由组件上都有一个属性 $route=>用来获取路由对象
   console.log(this.$route.query)
   
  },
components:{
    weather,search
}
}
</script>

<style lang="css" scoped>
/* 公共样式*/
*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

body {
    background : #222;
}

.card {
    width: 70%;
    max-width: 470px;
    background: linear-gradient(135deg, #00feba, #5b548a);
    color: #fff;
    margin: 100px auto 0;
    border-radius: 20px;
    padding: 40px 35px;
    text-align: center;
} 
</style>